<?php
/**
 * Description:
 *
 * @author      Eden
 * @datetime    2017/1/8 19:27
 * @copyright   WuHan HuQi Technology Co.,Ltd.
 * @url         http://cnhuqi.com
 */

class Center extends WX_Controller
{
    /**
     * 初始化
     * @throws Exception
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 个人中心
     */
    public function index()
    {
        $this->load->view('wx/center/index.html');
    }

    /**
     * 我的粉丝
     */
    public function fans()
    {
        $this->load->view('wx/center/fans.html');
    }

    /**
     * 粉丝列表
     */
    public function fansLists()
    {
        $this->load->view('wx/center/fans_lists.html');
    }

    public function edit()
    {
        $this->load->view('wx/center/user/edit.html');
    }

    /**
     * 钱包
     */
    public function cash()
    {
        $this->load->view('wx/center/cash/cash.html');
    }

    /**
     * 钱包
     */
    public function cashout()
    {
        $this->load->view('wx/center/cash/cashout.html');
    }

    /**
     * 申请成功
     */
    public function cashDetail()
    {
        $this->load->view('wx/center/cash/cash_detail.html');
    }

    /**
     * 申请成功
     */
    public function cashoutSucc()
    {
        $this->load->view('wx/center/cash/success.html');
    }

    /**
     * 海报
     */
    public function bill()
    {
        $this->load->view('wx/center/bill/index.html');
    }

    /**
     * 积分
     */
    public function integral()
    {
        $this->load->view('wx/center/integral/index.html');
    }

    /**
     * 优惠券
     */
    public function ticket()
    {
        $this->load->view('wx/center/ticket/index.html');
    }

    /**
     * 领取优惠券
     */
    public function getTicket()
    {
        $this->load->view('wx/center/ticket/get.html');
    }

    /**
     * 账号管理
     */
    public function accountIndex()
    {
        $this->load->view('wx/center/account/index.html');
    }

    /**
     * 修改手机号
     */
    public function accountEditMobile()
    {
        $this->load->view('wx/center/account/mobile.html');
    }

    /**
     * 修改手机号
     */
    public function accountEditPassword()
    {
        $this->load->view('wx/center/account/password.html');
    }

    /**
     * 修改手机号
     */
    public function memberCenter()
    {
        $this->load->view('wx/center/member/index.html');
    }

    /**
     * 销售中心
     */
    public function saleCenter()
    {
        $this->load->view('wx/center/sale/index.html');
    }

    /**
     * 收藏列表
     */
    public function collectList()
    {
        $this->load->view('wx/center/collect/index.html');
    }

    /**
     * 充值界面
     */
    public function cashin()
    {
        $this->load->view('wx/center/cash/cashin.html');
    }

    /**
     * 提现申请列表
     */
    public function cashoutApply()
    {
        $this->load->view('wx/center/cash/cashout_apply.html');
    }

    /**
     * 提现明细
     */
    public function cashoutDetail()
    {
        $this->load->view('wx/center/cash/cashout_detail.html');
    }

    /**
     * 充值记录
     */
    public function cashinDetail()
    {
        $this->load->view('wx/center/cash/cashin_detail.html');
    }

    // 采购商申请
    public function caigouApply()
    {
        $this->load->model('common/Caigou_Model', 'm');
        $item = $this->m->checkIfExists($this->userid);
        if (!empty($item)) {
            if ($item['status'] == 0) {
                $this->load->view('wx/center/caigou/appling.html');
            } else {
                $this->load->view('wx/center/caigou/caigou.html');
            }
        } else {
            $this->load->view('wx/center/caigou/apply.html');
        }
    }
}